package com.imayday.controller;

import com.imayday.entity.Order;
import com.imayday.feign.OrderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("feign")
public class OrderController {

    @Autowired
    private OrderFeign orderFeign;

    @GetMapping("/findAll")
    public List<Order> findAll() {
        return orderFeign.findAll();
    }
}
